<%--
    Document   : AsistenciaDeFeria
    Created on : 21-abr-2014, 17:04:58
    Author     : Isaac Paliza <anndysaac@hotmail.com>
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="css.css" />
    </head>
    <body>
        <header>
            <samp style=color:#FA6900;>Asistencia de Feria</samp>
        </header>
        <section>
            <section>
                <article id="v">
                    <figcaption>
                        <table style=color:#FFFFFF; bgcolor= "#8A9B0F" width="100%" height="100%">
                        <c:forEach items="${requestScope['DatosdeAsistenciaCabezera']}" var="d" varStatus="c">
                            <tr>
                                <th colspan="2">Lista de Asistencia</th>
                            </tr>
                            <tr align="left">
                                <th width="15%">Feria</th>
                                <th>${d['nombre']}</th>
                            </tr>
                            <tr align="left">
                                <th>Ubicacion</th>
                                <th>${d['ubicacion']}</th>
                            </tr>
                            <tr align="left">
                                <th>Fecha</th>
                                <th>${d['fecha']}</th>
                            </tr>
                        </c:forEach>
                        </table>
                    </figcaption>
                </article>
            </section>
            <%--  --%>
            <article id="fg">
                <table border="1px" rules="rows" width="100%" height="100%">
                    <tr bgcolor= "#FBB829" border="1px"><th align="center">N.</th><th></th><th align="left">Nombre y Apellidos</th><th>P</th>
                    <th>F</th></tr>
                <form action="AsistenciaDeFeria" method="GET" style="display:inline">
                <c:forEach items="${requestScope['DatosdeAsistencia']}" var="d" varStatus="c">
                    <c:choose>
                        <c:when test="${(c.count % 2) == 0}"></c:when>
                        <c:otherwise><tr></c:otherwise>
                    </c:choose>
                        <td align="center">${c.count}</td>
                        <td><input type="hidden" name="idTrabajador" value="${d['idTrabajador']}"/></td>
                        <td>${d['nombre']} ${d['apellidos']}</td>
                        <td valign="middle" align="center"><input type="radio" name="${d['idTrabajador']}" value="P" ${d['asistenciaP']}></td>
                        <td valign="middle" align="center"><input type="radio" name="${d['idTrabajador']}" value="F" ${d['asistenciaF']}></td> 
                        </tr>
                </c:forEach>
                        <td colspan="5" align="right">
                            ${requestScope['Mensaje']}
                        <input type="submit" name="GuardarAsistencia" value="Guardar Asistencia"/>        
                        </td>
                </form>
                </table>
            </article>
            
        </section>
    </body>
</html>